package homework.homework02;

public class Student {
    private String no;//学员编号
    private String name;//姓名
    private String sex;//性别
    private double height;//身高
    public int age;//年龄
    //满参构造
    public Student(String no, String name, String sex, double height, int age) {
        this.no = no;
        this.name = name;
        this.sex = sex;
        this.height = height;
        this.age = age;
    }
    //无参构造
    public Student(){}

    //get and set

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "学生{" +
                "学员编号='" + no + '\'' +
                ", 姓名='" + name + '\'' +
                ", 性别='" + sex + '\'' +
                ", 身高=" + height +
                ", 年龄=" + age +
                '}';
    }
}
